/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package toesp.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author satria.sp
 */
@Entity
@Table(name = "kuliah")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Kuliah.findAll", query = "SELECT k FROM Kuliah k")})
public class Kuliah implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "kuliah_id")
    private String kuliahId;
    @Column(name = "kuliah_nama")
    private String kuliahNama;
    @Column(name = "kuliah_tglmulai")
    private String kuliahTglmulai;
    @Column(name = "kuliah_tglakhir")
    private String kuliahTglakhir;
    @Column(name = "kuliah_kesetaraan")
    private String kuliahKesetaraan;
    @OneToMany(mappedBy = "kuliah")
    private List<Kesetaraan> kesetaraanList;
    @OneToMany(mappedBy = "kuliahKesetaraan")
    private List<Kesetaraan> kuliahKesetaraanList;
    @OneToMany(mappedBy = "kuliah")
    private List<Pendaftaran> pendaftaranList;
    @OneToMany(mappedBy = "kuliah")
    private List<Asisten> asistenList;
    @JoinColumn(name = "jurusan_id", referencedColumnName = "jurusan_id", insertable = false, updatable = false)
    @ManyToOne
    private Jurusan jurusan;
    @OneToMany(mappedBy = "kuliah")
    private List<Kuliahpt> kuliahptList;

    public Kuliah() {
    }

    public Kuliah(String kuliahId) {
        this.kuliahId = kuliahId;
    }

    public String getKuliahId() {
        return kuliahId;
    }

    public void setKuliahId(String kuliahId) {
        this.kuliahId = kuliahId;
    }

    public String getKuliahNama() {
        return kuliahNama;
    }

    public void setKuliahNama(String kuliahNama) {
        this.kuliahNama = kuliahNama;
    }

    public String getKuliahTglmulai() {
        return kuliahTglmulai;
    }

    public void setKuliahTglmulai(String kuliahTglmulai) {
        this.kuliahTglmulai = kuliahTglmulai;
    }

    public String getKuliahTglakhir() {
        return kuliahTglakhir;
    }

    public void setKuliahTglakhir(String kuliahTglakhir) {
        this.kuliahTglakhir = kuliahTglakhir;
    }

    public String getKuliahKesetaraan() {
        return kuliahKesetaraan;
    }

    public void setKuliahKesetaraan(String kuliahKesetaraan) {
        this.kuliahKesetaraan = kuliahKesetaraan;
    }

    @XmlTransient
    public List<Kesetaraan> getKesetaraanList() {
        return kesetaraanList;
    }

    public void setKesetaraanList(List<Kesetaraan> kesetaraanList) {
        this.setKesetaraanList(kesetaraanList);
    }

     

    @XmlTransient
    public List<Pendaftaran> getPendaftaranList() {
        return pendaftaranList;
    }

    public void setPendaftaranList(List<Pendaftaran> pendaftaranList) {
        this.pendaftaranList = pendaftaranList;
    }

    @XmlTransient
    public List<Asisten> getAsistenList() {
        return asistenList;
    }

    public void setAsistenList(List<Asisten> asistenList) {
        this.asistenList = asistenList;
    }

    public Jurusan getJurusan() {
        return jurusan;
    }

    public void setJurusan(Jurusan jurusan) {
        this.jurusan = jurusan;
    }

    @XmlTransient
    public List<Kuliahpt> getKuliahptList() {
        return kuliahptList;
    }

    public void setKuliahptList(List<Kuliahpt> kuliahptList) {
        this.kuliahptList = kuliahptList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (kuliahId != null ? kuliahId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Kuliah other = (Kuliah) obj;
        if ((this.kuliahId == null) ? (other.kuliahId != null) : !this.kuliahId.equals(other.kuliahId)) {
            return false;
        }
        if ((this.kuliahNama == null) ? (other.kuliahNama != null) : !this.kuliahNama.equals(other.kuliahNama)) {
            return false;
        }
        return true;
    }

    /**
     * @return the kuliahKesetaraanList
     */
    public List<Kesetaraan> getKuliahKesetaraanList() {
        return kuliahKesetaraanList;
    }

    /**
     * @param kuliahKesetaraanList the kuliahKesetaraanList to set
     */
    public void setKuliahKesetaraanList(List<Kesetaraan> kuliahKesetaraanList) {
        this.kuliahKesetaraanList = kuliahKesetaraanList;
    }

    
}
